const actions = {

}

const mutations = {
  GETTAGLIST(state,data){
    const index = state.tagList.findIndex(v=>data.path == v.path)
    if(index == -1){
      state.tagList.push(data)
    }
  },
  // 删除对应item
  DELETETAG(state,item){
    state.tagList = state.tagList.filter(v=>v.name!=item.name)
  }
}

const state = {
  tagList:[
    {
      "name": "home",
      "path": "/home",
      "label": "首页",
      "icon": "s-home",
      "url": "Home/Home"
    }
  ]
}

const getters = {

}

export default {
  namespaced:true,
  state,
  actions,
  mutations,
  getters
}